package org.zhouhe.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ArticleReco entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "article_reco", catalog = "zpd0t1_db")
public class ArticleReco implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = -3643686489090681161L;
	private Integer articleRecoId;
	private Industry industry;
	private Article article;
	private Integer firstPosition;

	// Constructors

	/** default constructor */
	public ArticleReco() {
	}

	/** full constructor */
	public ArticleReco(Industry industry, Article article, Integer firstPosition) {
		this.industry = industry;
		this.article = article;
		this.firstPosition = firstPosition;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "article_reco_id", unique = true, nullable = false)
	public Integer getArticleRecoId() {
		return this.articleRecoId;
	}

	public void setArticleRecoId(Integer articleRecoId) {
		this.articleRecoId = articleRecoId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Industry_id")
	public Industry getIndustry() {
		return this.industry;
	}

	public void setIndustry(Industry industry) {
		this.industry = industry;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "article_id")
	public Article getArticle() {
		return this.article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	@Column(name = "first_position")
	public Integer getFirstPosition() {
		return this.firstPosition;
	}

	public void setFirstPosition(Integer firstPosition) {
		this.firstPosition = firstPosition;
	}

}